An Efficient Algorithm for Approximate Pattern Matching with Swaps

نویسندگان

  • Matteo Campanelli
  • Domenico Cantone
  • Simone Faro
  • Emanuele Giaquinta
چکیده

The Pattern Matching problem with Swaps consists in finding all occurrences of a pattern P in a text T , when disjoint local swaps in the pattern are allowed. In the Approximate Pattern Matching problem with Swaps one seeks to compute, for every text location with a swapped match of P , the number of swaps necessary to obtain a match at the location. In this paper, we present new efficient algorithms for the Approximate Swap Matching problem. In particular, we first present a O(nm2) algorithm, where m is the length of the pattern and n is the length of the text, which is a variation of the Backward-Cross-Sampling algorithm, a recent solution to the swap matching problem. Subsequently, we propose an efficient implementation of our algorithm, based on the bit-parallelism technique. The latter solution achieves a O(mn)-time and O(σ)-space complexity, where σ is the dimension of the alphabet. From an extensive comparison with some of the most recent and effective algorithms for the approximate swap matching problem, it turns out that our algorithms are very flexible and achieve very good results in practice.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Patter Matching with Swaps in Linear Time for Short Patterns

The Pattern Matching problem with Swaps consists in finding all occurrence of a pattern P in a text T allowing a series of local swaps in the pattern where all the swaps are constrained to be disjoint. In the Approximate Pattern Matching problem with Swaps the output is, for every text location where there is a swapped match of P , the number of swaps necessary to create the swapped version tha...

متن کامل

Pattern Matching with Swaps in Practice

The Pattern Matching problem with Swaps consists in finding all occurrences of a pattern P in a text T , when disjoint local swaps in the pattern are allowed. In the Approximate Pattern Matching problem with Swaps one seeks, for every text location with a swapped match of P , the number of swaps necessary to obtain a match at the location. In this paper we devise two general algorithms for both...

متن کامل

Approximate Swapped Matching

Let a text string T of n symbols and a pattern string P of m symbols from alphabet be given. A swapped version P 0 of P is a length m string derived from P by a series of local swaps, (i.e. p 0 ` p `+1 and p 0 `+1 p `) where each element can participate in no more than one swap. The Pattern Matching with Swaps problem is that of nding all locations i of T for which there exists a swapped versio...

متن کامل

Linear Pattern Matching with Swaps for Short Patterns

The Pattern Matching problem with swaps is a variation of the classical pattern matching problem. It consists of finding all the occurrences of a pattern P in a text T , when an unrestricted number of disjoint local swaps is allowed. In this paper, we present a new, efficient method for the Swap Matching problem with short patterns. In particular, we present an algorithm constructing a non-dete...

متن کامل

A New Algorithm for Efficient Pattern Matching with Swaps

The Pattern Matching problem with Swaps consists in finding all occurrences of a pattern P in a text T , when disjoint local swaps in the pattern are allowed. In this paper, we present a new efficient algorithm for the Swap Matching problem with short patterns. In particular, we devise a O(nm) general algorithm, named Backward-Cross-Sampling, and show an efficient implementation of it, based on...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2009